package com.fz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by webrx on 2017-09-06.
 */
@Controller
public class User {
    @RequestMapping  //http://localhost/user 类名
    public String myuser() {
        System.out.println("myuser");
        return "ok";
    }

    //@RequestMapping("/index") @ResponseBody
    //public String index(){
    //    return "index首页";
    //}

    //@RequestMapping("/test")
    //public String test(HttpServletRequest req, HttpServletResponse resp){
    //  System.out.println("test");
    //return "redirect:/test.jsp";  // /test.jsp
    //return "redirect:ok.jsp";// /ok.jsp
    //return "redirect:ok/yy";
    //resp.sendRedirect("");


    //req.getRequestDispatcher("aa").forward(req,resp);
    //}

    //@RequestMapping("/user/save") @ResponseBody
    //public String save(Book book){
    //    System.out.println(book.getName());
    //    System.out.println(book.getPrice());


    //BookDAO.save(Book book);
    //BookDao.save(book);
    //    return null;
    //}
}
